 <%@ page errorPage="/WEB-INF/jsp/error.jsp"
    contentType="text/html; charset=utf-8"
%>
<%@ include file="page-init.jsp" %>
<SCRIPT LANGUAGE="JavaScript" src="<%=request.getContextPath() %>/js/ntkoocx.js"></SCRIPT>
<%@ page language="java" import="java.util.*" %>
<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html;charset=gb2312"> 
<TITLE>广东韶关移动知识维客管理系统</TITLE>
<style>
button.op{
width:90px;
background-color:#9DC2DB;
border:1px #EEEEEE solid;
cursor: hand;
}
</style>
</HEAD>
<%
   String server = request.getServerName();
   int port = request.getServerPort();
  String hostport = "http://"+server+":"+port+request.getContextPath()+"/en/Image:";
  String docid = request.getParameter("path");
  String docType = "vsd";
  String filename = "";
  if ( null == docid) //新文档
  {
  	docid = "";
  	Calendar rightNow = Calendar.getInstance();
  	filename = (new Integer(rightNow.get(Calendar.MONTH))).toString()+ rightNow.get(Calendar.YEAR) 
  		+ rightNow.get(Calendar.DAY_OF_MONTH)
  		+ rightNow.get(Calendar.MINUTE) + rightNow.get(Calendar.SECOND)+"."+docType; //缺省文件名
  }else{
    filename=docid+"."+docType;
  }
%>
<BODY onLoad='javascript:TANGER_OCX_OpenDoc("","<%=docType%>")'>
<center>
<FORM id="myForm" name="myForm" METHOD="POST" ENCTYPE="multipart/form-data" ACTION="<%=request.getContextPath() %>/en/Special:Upload">
<TABLE BORDER=0 width ="80%" align="center">	
	<tr>
	    <td width="30%" align="right">主题
	    <textarea style="display:none" name="description" rows="6" cols="80" id="uploadDescription" ></textarea>
	     <input style="display:none" name="hostport" id="hostport" value ='<%=hostport %>'/>	
	    </td>
		<td width="40%" align="center"><input id="filename" name="filename" MAXLENGTH=50 size=50 value="<%= filename %>"></td>
		<td width="30%" align="left"><INPUT type=BUTTON VALUE="上传" onclick="TANGER_OCX_SaveEditToServer();"> <INPUT  style="display:none" type=BUTTON VALUE="关闭" onclick="javascript:window.close();"></td>
	</tr>
</TABLE>
<table width=100% height=700 border=1 cellpadding=0 cellspacing=0 style="border:1px #9dc2db solid">
<tr width=100%><td valign=top width=90 style="display:none" >
	<button class="op" onclick="TANGER_OCX_OBJ.Titlebar = true;">显示标题栏</button>
	<button class="op" onclick="TANGER_OCX_OBJ.Titlebar = false;">隐藏标题栏</button>
	<button class="op" onclick="TANGER_OCX_OBJ.Menubar=false;">隐藏菜单</button>
	<button class="op" onclick="TANGER_OCX_OBJ.Menubar=true;">显示菜单</button>
	<button class="op" onclick="TANGER_OCX_OBJ.Toolbars=false;">隐藏工具栏</button>
	<button class="op" onclick="TANGER_OCX_OBJ.Toolbars=true;">显示工具栏</button>
	<button class="op" onclick="TANGER_OCX_OBJ.IsShowToolMenu=false;">隐藏工具菜单</button>
	<button class="op" onclick="TANGER_OCX_OBJ.IsShowToolMenu=true;">显示工具菜单</button>
	<button class="op" onclick="TANGER_OCX_OBJ.IsNoCopy=true;">禁止拷贝</button>
	<button class="op" onclick="TANGER_OCX_OBJ.IsNoCopy=false;">允许拷贝</button>		
	<button class="op" onclick="TANGER_OCX_EnableFileNewMenu(false)">禁止新建</button>
	<button class="op" onclick="TANGER_OCX_EnableFileNewMenu(true)">允许新建</button>
	<button class="op" onclick="TANGER_OCX_EnableFileSaveMenu(false)">禁止保存</button>
	<button class="op" onclick="TANGER_OCX_EnableFileSaveMenu(true)">允许保存</button>
	<button class="op" onclick="TANGER_OCX_EnableFileSaveAsMenu(false)">禁止另存</button>
	<button class="op" onclick="TANGER_OCX_EnableFileSaveAsMenu(true)">允许另存</button>
	<button class="op" onclick="TANGER_OCX_EnableFilePrintMenu(false)">禁止打印</button>
	<button class="op" onclick="TANGER_OCX_EnableFilePrintMenu(true)">允许打印</button>
	<button class="op" onclick="TANGER_OCX_SetMarkModify(true)">保留痕迹</button>
	<button class="op" onclick="TANGER_OCX_SetMarkModify(false)">不留痕</button>
	<button class="op" onClick="AddPictureFromLocal()">添加本地图片</button>
	<button class="op" onclick="AddPictureFromURL('200_80Logo.jpg')">从URL添加图片</button>
	<button class="op" onclick="AddSignFromLocal()">添加本地印章</button>
	<button class="op" onclick="AddSignFromURL('zhang_caiwu.gif.esp')">添加财务章</button>
	<button class="op" onclick="AddSignFromURL('zhang_hetong.gif.esp')">添加合同章</button>
	<button class="op" onclick="AddSignFromURL('zhang_xingzheng.gif.esp')">添加行政章</button>
	<button class="op" onclick="DoHandSign()">手写签名</button>
	<button class="op" onclick="DoHandDraw()">手工绘图</button>
	<button class="op" onclick="DoCheckSign()">印章验证</button>
	<button class="op" onclick="TANGER_OCX_AddDocHeader('某某政府机关红头文件')">文件套红</BUTTON>
	<button class="op" onclick="TANGER_OCX_ChgLayout()">页面布局</button>
	<button class="op" onclick="TANGER_OCX_ShowRevisions(true)">显示痕迹</button>
	<button class="op" onclick="TANGER_OCX_ShowRevisions(false)">隐藏痕迹</button>
	<button class="op" onclick="TANGER_OCX_PrintDoc()">打印</button>
</td>
<td width=100%>		
	<object id="TANGER_OCX" classid="clsid:C9BC4DFF-4248-4a3c-8A49-63A7D317F404" codebase="OfficeControl.cab#version=4,0,1,1" width="100%" height="850">
		<param name="BorderStyle" value="1">
		<param name="TitlebarColor" value="42768">
		<param name="TitlebarTextColor" value="0">
		<param name="Caption" value="欢迎使用！">
		<param name="Menubar" value="-1">
		<param name="IsNoCopy" value="-1">
		<param name="MakerCaption" value="广东韶关移动公司">
		<param name="MakerKey" value="783DBF7EC3E13DCEFF6E4003DA9E5EB0426BBB42">
		<param name="ProductCaption" value="Office在线编辑控件">
		<param name="ProductKey" value="E49BF6D7677B219A3065BCC3914D5FE5925EC1B9">
		<SPAN STYLE="color:red">不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。</SPAN>
	</object>
	<!-- 以下函数相应控件的两个事件:OnDocumentClosed,和OnDocumentOpened -->
	<script language="JScript" for=TANGER_OCX event="OnDocumentClosed()">
		TANGER_OCX_OnDocumentClosed();
	</script>
	<script language="JScript" for=TANGER_OCX event="OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj)">
		TANGER_OCX_OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj);
	</script>
</td>
</tr></table>	
</FORM>
</center>
</BODY>
</center>